home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / Audio-DSP / NU / Source / NObject.m < prev    next >
Encoding:
Text File  |  1992-11-13  |  732 b   |  32 lines

  1. #pragma .h #import <objc/Object.h> 
  2. #pragma .h #import <appkit/Application.h> 
  3. #import "NObject.h"
  4. #import "MenuManager.h"
  5.  
  6. /**
  7.  ** NObjects are just like Objects, 
  8.  ** except that they do not kill off
  9.  ** the application when they receive
  10.  ** a message they can't understand.
  11.  ** Instead, they pop up an alert panel,
  12.  ** allowing the user to either continue,
  13.  ** or abort.
  14.  **/
  15.  
  16. @implementation NObject: Object
  17. {
  18. }
  19.  
  20. - doesNotRecognize: (SEL)aSelector ;
  21. { int rval ;
  22.   rval = NXRunAlertPanel("Nu",
  23.      "Nu Error:\n%s doesNotRecognize: %s","Continue","Abort Nu",
  24.       NULL, [self name], sel_getName(aSelector)) ;
  25.   if(rval == 1) // i.e. continue
  26.     return self ;
  27.   [self error: "Nu aborted by user\n"] ;
  28.   return self ;
  29.  
  30.  
  31. @end